@extends('newAdmin.layout.main')

@section('content')
    <div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="">首页</a>
        <a href="">积分记录管理</a>
        <a>
          <cite>积分记录列表</cite>
        </a>
      </span>
        <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
            <i class="layui-icon" style="line-height:30px">ဂ 刷新</i>
        </a>
    </div>
    <div class="x-body">
        <div class="layui-row">
            <form action="{{url('backstage/adminOptionLog')}}" class="layui-form layui-col-md12 x-so" method="get">
                {{csrf_field()}}
                {{--<input class="layui-input" placeholder="开始日" name="start" id="start">--}}
                {{--<input class="layui-input" placeholder="截止日" name="end" id="end">--}}
                <input type="text" name="keywords"  placeholder="请输入用户id" autocomplete="off" class="layui-input">
                <button class="layui-btn" lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
            </form>
        </div>
        {{--<xblock>--}}
            {{--<button class="layui-btn layui-btn-danger" onclick="delAll()"><i class="layui-icon"></i>批量删除</button>--}}
            {{--<button class="layui-btn" onclick="x_admin_show('添加用户','./member-add.html',600,400)"><i class="layui-icon"></i>添加</button>--}}
            {{--<span class="x-right" style="line-height:40px">共有数据：88 条</span>--}}
        {{--</xblock>--}}
        <table class="layui-table">
            <thead>
            <tr>
                {{--<th>--}}
                    {{--<div class="layui-unselect header layui-form-checkbox" lay-skin="primary"><i class="layui-icon">&#xe605;</i></div>--}}
                {{--</th>--}}
                <th>ID</th>
                <th>用户ID</th>
                <th>操作类别</th>
                <th>操作积分</th>
                <th>总额</th>
                <th>总收入</th>
                <th>总支出</th>
                <th>可用积分</th>
                <th>冻结积分</th>
                <th>备注</th></tr>
            </thead>
            <tbody>
            @foreach($list as $msg)
                <tr>
                    {{--<td>--}}
                    {{--<div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id='2'><i class="layui-icon">&#xe605;</i></div>--}}
                    {{--</td>--}}
                    <td>{{$msg->id}}</td>
                    <td>{{$msg->user_id}}</td>
                    @if ($msg->type == 'prepaid')
                        <td>增加</td>
                    @elseif($msg->type == 'freeze')
                        <td>冻结</td>
                    @elseif($msg->type == 'transfer')
                        <td>扣除</td>
                    @endif
                    <td>{{$msg->integral}}</td>
                    <td>{{$msg->total}}</td>
                    <td>{{$msg->income}}</td>
                    <td>{{$msg->expend}}</td>
                    <td>{{$msg->available_integral}}</td>
                    <td>{{$msg->freeze}}</td>
                    <td>{{$msg->remark}}</td>
                </tr>
            @endforeach
            </tbody>
        </table>
        <div class="page">
            {{$list->links()}}
        </div>
    </div>
    <script>

    </script>
@endsection

